package com.nep.NEPG.service;

import com.nep.NEPG.model.Task;
import com.nep.NEPG.repository.TaskRepository;
import java.util.List;

public class TaskService {
    private final TaskRepository taskRepository;

    public TaskService(TaskRepository taskRepository, AuthService authService) {
        this.taskRepository = taskRepository;
    }

    public List<Task> getMyTasks(String userId) {
        return taskRepository.findByAssignee(userId);
    }

    public Task getTaskById(String id) {
        return taskRepository.findById(id);
    }
}